<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

  <!-- 引入Bootstrap 5稳定版的CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">

  <!-- 引入Bootstrap 5稳定版的JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</head>

<body>
  <div id="app">
    <ul>
      <li v-for="(item, index) in list" :key="item.id" @click="currentIndex=index">
        <a href="#" :class="{ actived:  index=== currentIndex }">{{ item.name }}</a>
      </li>
    </ul>
    <label v-bind:style="{ color: fcolor , fontSize: fs + 'px' }">标签样式</label>

  </div>

</body>
<script>
  var vueApp = new Vue({
    el: '#app',
    data: {
      fs: 15,
      fcolor: 'black',
      currentIndex: 0,
      message: 'Hello Vue.js!',
      list: [{ id: 1, name: '张三' }, { id: 2, name: '李四' }, { id: 3, name: '王五' }]
    }
  })
</script>

<style>
  .actived {
    background-color: red;
    color: white;
    font-weight: bold;
    width: 300px;
    height: 100px;
  }
</style>

</html>